#include <QPalette>

#include "soundControl.h"

soundControl::soundControl(QWidget *parent) : QWidget(parent)
{
    this->setFixedSize(150, 50);
    QPalette palette;
    palette.setColor(QPalette::Window, QColor(0, 0, 0, 0));
    this->setPalette(palette);

    slider.setRange(0, 100);
    slider.setValue(100);
    slider.setTracking(true);

    layout.setMargin(0);
    layout.setSpacing(2);
    layout.addWidget(&icon);
    layout.addWidget(&slider);
    this->setLayout(&layout);


    QObject::connect(&slider, SIGNAL(valueChanged(int)),
                     this, SIGNAL(volumeChange(int)));
    QObject::connect(&icon, SIGNAL(muteChanged(int)),
                     this, SIGNAL(muteChanged(int)));
}


